﻿<UserControl x:Class="ConsoleHoster.View.Controls.TextBoxWithActionButton"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" d:DesignWidth="300">
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="Auto" />
        </Grid.ColumnDefinitions>
        <TextBox VerticalAlignment="Center" Text="{Binding Path=Text, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}, Mode=TwoWay, ValidatesOnExceptions=True}" />
        <Button Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Center" Cursor="Hand" x:Name="btnAction" Click="btnAction_Click" ToolTip="Choose File..." Content="..."  VerticalContentAlignment="Center" Margin="3,0,0,0" Padding="3, 0, 3, 0"/>
    </Grid>
</UserControl>
